package com.bsj.sipgateway.common.def;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class RecordList extends  RecordEmpty {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2010644853378045192L;
		
	public List<RecordFile> listFile = new LinkedList<RecordFile>();
	public int totalPage = 1;
	public int curPage = 1;
	
	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getCurPage() {
		return curPage;
	}

	public void setCurPage(int curPage) {
		this.curPage = curPage;
	}

	public void setRecordFile(RecordFile file) {
		
		if(null == listFile) {
			listFile = new LinkedList<RecordFile>();
		}
		
		listFile.add(file);
	}

	public List<RecordFile> getListFile(){
		return listFile;
	}

	public int getRecordFileSize() {
		return listFile.size();
	}

	public void addRecordFiles(Collection<RecordFile> files) {

		if(null == listFile) {
			listFile = new LinkedList<RecordFile>();
		}

		listFile.addAll(files);
	}

	
	@Override
	public String toString() {
		return "RecordList [status=" + status + ", info=" + info + ", session=" + session + ", records=" + records
				+ ", listFile=" + listFile + "]";
	}	
}
